<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        
        li {
            list-style: none;
        }
        
        #wrapper {
            width: 80vw;
            height: 80vh;
            overflow: hidden;
        }
        
        #wrapper li {
            width: 80vw;
            height: 80vh;
        }
        
        .red {
            background-color: red;
        }
        
        .green {
            background-color: green;
        }
        
        .blue {
            background-color: blue;
        }

        #wrapper2 {
            width: 100vw;
            overflow: hidden;
        }
        
        #wrapper2 ul {
            display: flex;
            width: 120vw;
        }
        
        #wrapper2 li {
            border: 1px solid red;
            flex: 1;
            height: calc( 100% - 1px);
            box-sizing: border-box;
        }
    </style>
</head>
<body>
    <script src="https://unpkg.com/better-scroll@latest/dist/better-scroll.min.js"></script>
    <div id="wrapper">
        <ul class="content">
            <li class="red"></li>
            <li class="green"></li>
            <li class="blue"></li>
        </ul>
    </div>
    
    <div id="wrapper2">
        <ul class="content">
           <li>新闻</li>
           <li>体育</li>
           <li>社会</li>
           <li>新闻</li>
           <li>体育</li>
           <li>社会</li>
        </ul>
    </div>

    <script>
        var bs = BetterScroll.createBScroll('#wrapper', {});

        var bs2 = BetterScroll.createBScroll('#wrapper2', {
            scrollX:true
        });

        console.log(bs);
        console.log(bs2);
    </script>
</body>
</html>